//
// Select
// --------------------------------------------------

@select-padding-horizonal: 12px;

.mui-select-wrapper {
    position: relative;
    display: inline-block;

    &:focus {
        outline: 0;
    }
}

.mui-select-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding-left: @select-padding-horizonal !important; // overwrite input padding
    padding-right: 20px !important; // overwrite input padding
    cursor: default;
    transition: border-color 200ms;

    &.open {
        border-bottom-color: #efefef !important;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

.mui-select-wrapper.round {
    border-radius: @input-round-radius;

    .mui-select-trigger {
        border-radius: @input-round-radius;

        &.open {
            border-color: darken(@border-color-base, 16%) !important;
        }
    }

    .mui-select-options {
        margin-top: 4px;
        padding: 8px 0;
        border-radius: 12px;
    }
}

.mui-select-wrapper.shadow {
    .mui-select-trigger {
        box-shadow: @input-shadow;
    }

    .mui-select-options {
        border: 0;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.34);
    }
}

.mui-select-caret {
    position: absolute;
    top: 0;
    right: 8px;
    bottom: 0;
    margin: auto 0;
    width: 0;
    height: 0;
    color: @icon-color-default;
    border-color: @icon-color-default transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0;
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
    transition: transform .3s;
}

.mui-select-trigger.open + .mui-select-caret {
    // border-color: transparent transparent @icon-color-default;
    // border-width: 0 4px 5px;
    transform: rotate(180deg);
}

.mui-select-trigger[disabled] + .mui-select-caret {
    border-color: @text-color-disabled transparent transparent;
}

.mui-select-options {
    width: 100%;
    max-height: 302px;
    padding: 0;
    margin-top: 0;
    overflow: auto;
    border-top: 0;
    border-color: darken(@input-border-color, 5%);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);

    > li {
        display: block;
        height: @input-height-base - 1;
        line-height: @input-height-base - 1;
        padding: 0 @select-padding-horizonal;
        clear: both;
        color: #555;
        font-size: @font-size-base;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        
        &:hover {
            background-color: @menu-hover-bg;
        }

        &.selected {
            color: @primary-color;
        }

        &.disabled {
            background-color: #fff;
            color: @text-color-disabled;
            cursor: default;
        }

        &.group-label {
            background-color: #fff;
            font-weight: 600;
            cursor: default;
        }
        
        &.group-option {
            padding: 0 30px;
        }
    }
}